Ami2D

Two Dimensional Finite Element Analysis for the Amiga

Edition 1.0, for Ami2D Version 1.0 July 1993

Russell Leighton

Copyright \begin{matrix}c \\ ◯ \end{matrix} 1992, 1993 Russell Leighton

This is the first edition of the Ami2D documentation.

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Ami2D Copying Conditions

Permission is granted to any individual or institution to use, copy, and distribute this software, provided that this copyright and permission notice is maintained, intact, in all copies and supporting documentation. The original distribution of this software must remain intact and specifically must include all documentation, supporting software/data, and disclaimer.

No charge may be made for distribution, except for costs of media and/or shipping.

Disclaimer

This software is provided on an “as is” basis without expressed or implied warranty. The author of this code and documentation takes no responsibility for inappropriate use of this code and does not warrant the code in any fashion. In other words, use of this code is done solely at the users risk and any problems resulting due to misuse or coding errors is strictly the users responsibility.

This code is intended for research and educational uses only. Any other use of this code, specifically in the areas of design and analysis of direct or indirect man-rated systems, is strongly discouraged. The author of this code is not responsible or liable for any consequences or results that occur from the use (or misuse) of this code.

1 Introduction

Ami2D forms the core of a collection of codes developed to perform various analyses on structures using the finite element technique. Specifically, Ami2D is a pre/post-processor used to create two dimensional finite element models and to interpret the results from subsequent solutions. It was developed to handle both “plane” and axisymmetric two dimensional finite element analysis problems. It is a fairly general capability in the sense that a wide variety of two dimensional problems can be modeled by Ami2D. Other codes are included to provide a fairly complete analysis capability. These codes include the solvers (see Appendix C [Lin2D], page 44 and Appendix D [Nln2D], page 48), a node equivilence code (see Appendix E [Equ2D], page 50), a node order optimizer (see Appendix F [Opt2D], page 51), and a couple of ancillary codes (see Appendix G [Rexxcon], page 52 and Appendix H [Rexxbar], page 56). Of course, the user is free to utilize other utility codes to enhance the operation and functionality of this collection.

The main features of the Ami2D collection are as follows:

• may be run in the background or interactively

• two-dimensional plane or axisymmetric problems

• cartesian or polar coordinate systems

• uses ARexx macro language

• linear and quadratic isoparametric elements available

• no limit on number of nodes, elements, materials, or boundary conditions (only limited by memory)

• no need to specify problem size (determined at run time)

• choice of Dirchlet (constraint) or Neumann (flux), point or distributed boundary conditions • graphical interface for pre/post-processor

• definable post-processing functions

• command aliases for customized uses

• linear and nonlinear (geometric) solvers provided

• solvers use a symmetric banded matrix storage format

• solvers can handle coupled analyses

• node order optimizer for bandwidth reduction

• node equivilence code for part “welding”

• ancillary codes provided for integrated, interactive environment

2 Command Reference

This chapter is included as a reference to the commands available for use in ARexx macros.

2.1 Macros and Syntax

Ami2D accepts ARexx commands passed to its message port (address ami2d). These include all necessary commands to completely define the two dimensional finite element model, material properties, and boundary conditions. It is possible (and often most desirable) to create a model completely from these commands (saved in an ARexx macro file.) However, it is also possible to create a complete model interactively through the graphical interface provided in the Ami2D pre/post-processor. The model, in either case, should then be saved to a binary model file which can then be read back into Ami2D at a later time or read into and processed by a solver (see Appendix C [Lin2D], page 44 and Appendix D [Nln2D], page 48) or other utility codes. In turn, the results produced by other codes can be saved back into the model file which in turn can be postprocessed by Ami2D. The complete process can be performed in an integrated, interactive session using some ancillary codes developed to interface these processing codes. A good example of how Ami2D can be used in an interactive mode is through the use of the ARexx macro ‘ami2d.rexx’ provided. Use of this macro will be discussed later.

In general the command line syntax for executing Ami2D as a stand-alone program is:

         -> [run] Ami2D [script]

where script is the name of an input ARexx script to be processed. If no script is specified then the code will wait until it receives a command, presumably from a subsequently executed ARexx command or script.

Commands for Ami2D, placed in an ARexx macro, consist of a command keyword followed by arguments. The arguments may be separated from the command keyword with parentheses and delimited with commas (analagous to a function call) or may be separated (and delimited) with spaces. If parentheses and commas are used then the command line must be surrounded by single quotes or else ARexx will interpret the command as a library function call (rather than a command meant for the host.) The use of spaces to delimit the command keyword and arguments is recommended for most commands, however, the use of parentheses and commas is recommended when defining aliases (see Section 2.7.13 [alias], page 23). Also any expressions that are meant to be evaluated internally by Ami2D should be surrounded by single quotes (see Section 2.7.10 [set], page 20). For example, the lines below show a sequence of ARexx commands for Ami2D.

/* this is a simple example of an ARexx macro for Ami2D */
address ami2d
set 'struct 0'
set 'la=a2*a3/((1+a3)*(1-2*a3))'
set 'mu=a2/(2*(1+a3))'
alias 'iso=mat(a1,0,0,la+2*mu,la+2*mu,la+2*mu,mu,la,la,0.0,la)'
alias 'quad4=elem(a1,a2,4,4,a3,a4,a5,a6)'
reset
problem 'struct'
axisym
iso 1 1.0 0.0
h = 0.25
do i=0 to 4
    do j=1 to 5
        k = i*5 + j
        node k j*h i*h
    end
end
do i=0 to 3
    do j=1 to 4
        k = i*4 + j
        n = i*5 + j
        quad4 k 1 n n+1 n+6 n+5
    end
end

Note that the alias and set commands always require expressions as arguments (to be evaluated internally by Ami2D) and, therefore, the arguments must be surrounded by single quotes. Also note that in the problem command the argument is also surrounded by single quotes since 'struct' is an internally defined variable (which is not known to ARexx.) The general rule is to surround expressions (which can be single variables), which are to be interpreted internally by Ami2D, with single quotes. Otherwise, expressions (and variables) will be interpreted by ARexx before being sent

to Ami2D.

The above example shows the command node k j*h i*h where i, j, k, and h are ARexx variables. In the first pass through the loop containing this command the actual command line issued to Ami2D is node 1 0.25 0.0 which results in the creation of node 1 at coordinates (0.25,0.0). For further details on the ARexx macro language the interested reader should refer to texts (see Chapter 5 [References], page 37) that specifically address the ARexx language. ARexx is a complete macro programming language and as such cannot not be described in adequate detail here. The following section, however, describes the commands available within ARexx macros for use with Ami2D. A detailed example is also included in a later chapter.

It is important to note that all identification numbers are one based. That is all material, node, element and element side identification numbers must start at one or greater. The use of zero is reserved to flag interactive specification (which will be discussed later) and will cause an error if used in a non-interactive session.

Most examples shown (as well as most of the commands in the scripts included) use parentheses and commas to delimit commands and arguments. However, this is done only for clarity. In addition, to help clarify commands as well as to demonstrate the flexibility of the codes, many of the examples show the use of the alias and set commands. It is through the use of these commands that Ami2D can be tailored to many different engineering applications. More on this will be discussed later.

2.2 Problem Type

These commands specify the kind of problem to be modeled and the type of assumption used to restrict the problem to two dimensions.

2.2.1 problem

     'problem(kind,dof)'
         where:  kind ≡ problem kind
                 dof ≡ number of unknowns (per node)
     example -> 'set thermal=1'
                'problem(thermal)'

This command requires an argument specifying the kind of problem. The problem kind can be set to any desired value. This value is used to associate materials, boundary conditions and solutions (with the kind corresponding to the problem kind.) The second argument may be used to specify the number of degrees of freedom per node. For instance, in structural problems (in two dimensions) two displacements for each node are the degrees of freedom. In thermal (heat conduction) problems one temperature for each node is solved for. If this argument is not given then it is assumed that for a problem kind set to an even number the degrees of freedom is set at two, otherwise, it is assumed to be one.

2.2.2 plane

This command is used to specify a “plane” assumption (i.e. the problem solution is independant of the out-of-plane direction.) There are no arguments to this command.

2.2.3 axisym

This command is used to specify an axisymmetric assumption (i.e. the problem solution is independant of the circumferential direction.) There are no arguments to this command.

2.3 Materials

The following command allows specification of material properties.

2.3.1 mat

     'mat(id,type,kind,C[10],ckind,f[2],ref,ckind,f[2],ref)'
         where:  id ≡ material identification number
                 type ≡ material type
                 kind ≡ material kind (should correspond to problem type)
                 C[10] ≡ material coefficients
                 ckind ≡ coupled problem kind
                 f[2] ≡ body force coefficients
                 ref ≡ reference value
     example -> 'set la=a2*a3/((1+a3)*(1-2*a3))'
                'set mu=a2/(2*(1+a3))'
                'alias iso=mat(a1,0,0,la+2*mu,la+2*mu,la+2*mu,mu,la,la,0.0,la)'
                'iso(1,10.e6,0.32)'

This command requires specification of the material identification number, material type, material kind, material coefficients, and two sets of body force terms consisting of couple problem kind, body force coefficients, and reference value.

The couple problem kind may be specified in order to couple the solution from a previous analysis with the body force coefficients used in the current analysis. If no coupling is desired then these values should be set to the material kind. The body force coefficients are used to define properties associated with body forces. The reference value can be used to specify a reference temperature, species concentration, etc. A reference temperature, for example, could be used to determine a change in temperture due to heat conduction thereby coupling the solution obtained from a heat transfer analysis with a structural analysis.

The use of these values is dependant on the solver (see Appendix C [Lin2D], page 44 and Appendix D [Nln2D], page 48) used to calculate a solution. Therefore, to determine what is required for input the documentation for the specific solver must be consulted.

2.4 Geometry

The following commands are used to create the geometry of the model in terms of nodes and elements. For element specification the nodes must be specified in the order shown in figure 1.

Figure 1 – Element Maps

2.4.1 node

     'node(id,x,y)'
         where:  id ≡ node identification number
                 x ≡ x (or r) coordinate of node
                 y ≡ y (or t) coordinate of node
     example -> 'node(1,0.5,1.0)'

This command will create a node located at a specified coordinate. The arguments are the node identification number and the coordinate pair. The coordinate pair is interpreted depending on the coordinate setting (see Section 2.7.3 [coord], page 16). If the coordinate is not given then the node will be placed at (0,0). However, if the screen is open (see Section 2.8.1 [open], page 25) then the node will be placed at the selected location (using the mouse pointer.) If the identification number is not given (or is zero) the next largest node number will be used.

2.4.2 elem

'elem(id,mat,nnodes,nint,nodes[9])'
where:  id ≡ element identification number
    mat ≡ material identification number
    nnodes ≡ number of nodes
    nint ≡ number of integration points
    nodes ≡ node identification numbers
example -> 'alias quad4=elem(a1,a2,4,4,a3,a4,a5,a6)'
   'quad4(1,1,1,2,3,4)'

This command is used to create elements based on isoparametric shape functions. The required arguments are the element identification number, material identification number (referring to an existing material), number of nodes, number of integration points and the node numbers (also referring to existing nodes.) The following are possible element specifications.

nnodes    nint   order       shape           integration rule
3       1   linear      triangle        1 point
6       1   quadratic   triangle        1 point
6       3   quadratic   triangle        3 point
4       1   linear      quadralateral   1 point
4       4   linear      quadralateral   2x2 point
8       1   quadratic   quadralateral   1 point     (not recommended)
8       4   quadratic   quadralateral   2x2 point
8       9   quadratic   quadralateral   3x3 point
9       1   quadratic   quadralateral   1 point     (not recommended)
9       4   quadratic   quadralateral   2x2 point
9       9   quadratic   quadralateral   3x3 point

If any node numbers are not specified and the screen is open (see Section 2.8.1 [open], page 25) then the node (or nodes) can be selected using the mouse pointer (in the correct order.) If the material number is not given then material one will be used. If the identification number is not given (or is zero) the next largest element number will be used.

2.5 Boundary Conditions

The following commands allow specification of the boundary conditions. A sufficient specification of the boundary conditions is necessary to result in a solvable problem. If during the solve phase of the analysis an error occurs it is most likely due to insufficient or improper application of boundary conditions.

2.5.1 pbc

     'pbc(node,type,kind,dir,val)'
         where:  node ≡ node identification number
                 type ≡ boundary condition type
                 kind ≡ boundary condition kind
                 dir ≡ boundary condition direction
                 val ≡ boundary condition value
     example -> 'alias dispx=pbc(a1,1,0,1,a2)'
                'dispx(5,0.0)'
                'alias forcr=pbc(a1,2,0,1,a2)'
                'forcr(10,100.0)'
                'alias temp=pbc(a1,1,1,1,a2)'
                'temp(2,77)'

This command specifies boundary conditions applied at nodes. This boundary condition may be either a Dirchlet or flux type boundary condition. The first argument is the identification number for the node at which the boundary condition is applied. If zero is input and the screen is open (see Section 2.8.1 [open], page 25) then the node is selected using the mouse pointer. The second argument is used to specify the type of boundary condition. A Dirchlet boundary condition is type 1. A flux boundary condition is type 2. The next argument specifies the kind of boundary condition and should correspond to the problem kind. Different kinds of boundary conditions may be applied to a single node. The appropriate boundary condition will be selected by the solver (see Appendix C [Lin2D], page 44 and Appendix D [Nln2D], page 48) depending on the problem kind being solved. Also, depending on the currently specified problem kind Ami2D will display only the corresponding boundary conditions. The next argument is used to specify the global direction for the boundary condition. For scalar boundary conditions use 1. For vector boundary conditions use 1 or 2 to specify the global direction (1 for x or r, 2 for y or z.) The last argument is the boundary condition value. If not specified then the boundary condition will be removed (if it exists.)

2.5.2 dbc

     'dbc(elem,type,kind,dir,side,val[3])'
         where:  elem ≡ element identification number
                 type ≡ boundary condition type
                 kind ≡ boundary condition kind
                 dir ≡ boundary condition direction
                 side ≡ element side
                 val ≡ boundary condition value(s)
     example -> 'alias press=dbc(a1,2,0,1,a2,a3)'
                'press(20,1,-1000.0)'
                'alias slope=dbc(a1,1,0,1,a2,a3)'
                'slope(12,3,0.0)'

This command specifies boundary conditions applied along element sides. This boundary condition may be either Dirchlet or flux type boundary conditions. The first argument is the identification number for the element. The second argument is used to specify the type of boundary condition. A Dirchlet boundary condition is type 1. A flux boundary condition is type 2. The next argument specifies the kind of boundary condition and should correspond to the problem kind. Different kinds of boundary conditions may be applied to an element side. The appropriate boundary condition will be selected by the solver (see Appendix C [Lin2D], page 44 and Appendix D [Nln2D], page 48) depending on the problem kind being solved. Also, depending on the currently specified problem kind Ami2D will display only the corresponding boundary conditions. The next argument is used to specify the local direction for the boundary condition. For scalar boundary conditions use 1. For vector boundary conditions use 1 or 2 to specify the local direction (1 for normal to element side, 2 for tangent to element side.) The next argument is the element side number. If zero is input for the element number and the screen is open (see Section 2.8.1 [open], page 25) then the element is selected using the mouse pointer. If the side number is also input as zero then the side closest to the point where the element was selected will be used. The succeeding arguments specify the value of the boundary condition at each nodal location. If one value is specified the boundary condition value is assumed to be constant across the element side. If two or more values are given the value will vary either linearly or quadraticly depending on the order of the element. If no values are specified then the boundary condition will be removed (if it exists.)

2.6 Problem Solution

The following commands are used to post process results.

2.6.1 eval

     'eval(expr,elem,np,xi,yi)'
         where:  expr ≡ any valid expression
                 elem ≡ element number (order or identification)
                 np ≡ if np < 0 then specifies quadrature point
                       if np > 0 then specifies nodal point
                       if np = 0 then use xi,yi
                 xi ≡ local coordinate (-1.0 <= xi <= 1.0)
                 yi ≡ local coordinate (-1.0 <= yi <= 1.0)
     example -> 'eval(sig1,101,0,0.0,0.0)'

Given a solution calculated by a solver (see Appendix C [Lin2D], page 44 and Appendix D [Nln2D], page 48) this command is used to evaluate the solution at specified locations. Any valid expression (see Section 2.7.10 [set], page 20) may be given in the first argument. The second argument, if given, specifies the element by order number (greater than or equal to zero) or by identification number (less than zero.) The third argument indicates either the local node number (greater than zero), the Gaussian quadrature point (less than zero) or if given as zero the next two arguments are used to specify the local coordinates (see Section 2.4 [Geometry], page 9). If the element number (and all subsequent arguments) are not given then the expression will be evaluated as a stand-alone expression (no solution values will be valid.) In this way eval may be used as an online calculator (though somewhat limited.) If the third argument (and all subsequent arguments) are not given and the screen is open (see Section 2.8.1 [open], page 25) then the location for solution evaluation is given by selecting it with the mouse. The computed value for the specified location and the expression given is returned in RESULT (assuming options results is used in the macro.)

2.6.2 post

     'post(expr,location)'
         where:  expr ≡ any valid expression
                 location ≡ location flag ("gauss" or "node")
     example -> 'post(sig1)'

Given a solution calculated by a solver (see Appendix C [Lin2D], page 44 and Appendix D [Nln2D], page 48) this command will post-process the solution over the complete model. Any valid expression (see Section 2.7.10 [set], page 20) may be given in the first argument. The second argument indicates where the solution will be evaluated in each element. If gauss is specified then the solution will be processed at the Gaussian quadature points. If node is specified then processing will occur at the node locations. If this argument is not given then gauss is assumed. More accurate stress/strain results can be expected using the gauss option. The calculated results are stored internally and can only be utilized (currently) by the fill result command (see Section 2.8.4 [fill], page 26).

2.7 Utility Commands

These commands are included for additional capability and interactivity.

2.7.1 save

     'save(file)'
         where:  file ≡ name of file to contain data
     example -> 'save(ram:model.dat)'

The complete model, problem type, material properties, geometry, boundary conditions, solutions, functions and aliases may be saved to a file using this command. The file format used is an Interchange File Format (IFF) type developed specifically for this code. It is a binary file format and therefore cannot be edited conventionally. The only argument to this command is the name of the file to store the data. If no argument is given and the screen is open (see Section 2.8.1 [open], page 25) then a file requester will be displayed.

2.7.2 read

     'read(file)'
         where:  file ≡ name of file that contains data
     example -> 'read(results.dat)'

The file produced by the save command (see Section 2.7.1 [save], page 15) can be read in by this command. The only argument to this command is the name of the file containing the data. If no argument is given and the screen is open (see Section 2.8.1 [open], page 25) then a file requester will be displayed.

2.7.3 coord

     'coord(system,xorg,yorg)'
         where:  system ≡ "cartesian" or "polar"
                 xorg ≡ global 'x' coordinate for origin
                 yorg ≡ global 'y' coordinate for origin
     example -> 'coord(polar,5,5)'

This command sets the coordinate system to either the cartesian or polar coordinate systems. It also allows specification of the coordinate system origin. This command affects all commands that accept or return coordinate data. It will also affect the display of coordinates in the screen title bar as well as the grid command (if the screen is open see Section 2.8.1 [open], page 25). It should be noted that even if a model is not inherently cylindrical many circular features can be modeled more effectivily using the polar coordinate system (with an origin offset.) The coordinate system may be changed at any point during the modeling process with no effect on previously issued commands.

2.7.4 cd

     'cd(dir)'
         where:  dir ≡ directory path (if not specified current
                 directory returned)
     example -> 'cd(ami2d:test)'

This command changes the directory path used by the read (see Section 2.7.2 [read], page 15) and save (see Section 2.7.1 [save], page 15) commands. The argument is the new directory path and must be a complete path specification. If no argument is given then the current directory path will be returned (if it was previously specified.)

2.7.5 reset

     'reset(flag)'
         where:  flag ≡ "all", "solution", "groups", "functions" or "aliases"

This command will selectivily clear (deallocate) memory. If no argument is given then all memory will be deallocated except for functions and aliases. This should always be done before starting a new problem. If all is specified then all memory is deallocated (should only be done when beginning a completely different kind of problem.) Specifing solutions, groups, functions or aliases will deallocate the associated sections of memory.

2.7.6 check

     'check'

This command will perform a check of model integrity. It will check for undefined nodes, elements and materials over elements and boundary conditions. These checks do not insure that the resulting system will be solvable, nor does it insure that element mapping is invertible (a necessary condition.) However, if errors occur during formation of the global stiffness matrix that is generally an indication that the mesh is malformed, therefore, check the model for elements that are misshapen or misnumbered. Also, if errors occur in the solver check the boundary conditions for completeness (do not allow rigid body motion or rotation.) Model statistics and memory requirements will also be output with this command. There are no arguments to this command.

2.7.7 info

     'info'
     'info("mat",n)'
         where:  n ≡ material identification number
     'info("node",n)'
         where:  n ≡ node order number
     'info("elem",n)'
         where:  n ≡ element order number
     'info("pbc",dof,n)'
         where:  dof ≡ degree of freedom
                 n ≡ node order number
     'info("dbc",dof,n,side)'
         where:  dof ≡ degree of freedom
                 n ≡ element order number
                 side ≡ element side
     'info("soln",dof,n)'
         where:  dof ≡ degree of freedom
                 n ≡ node order number
     'info("group",name)'
         where:  name ≡ group name

     'info("window")'
     example -> 'info(elem,-2)'

This command gives information on the overall model and optionally on materials, nodes, elements, boundary conditions, solutions, groups and window settings. If no argument is given then the number of nodes, elements, groups and solutions is returned in the ARexx variable RESULT (assuming options results is used.)

If the first argument is mat then information is returned for the material specified by the second argument. A material is referenced by its identification number and by the currently specified problem kind (see Section 2.2.1 [problem], page 6). The data returned is the material order number, material id, type, kind, material coefficients (10), and two sets of body force terms consisting of the couple problem kind, body force coefficients (2), and reference value. If the material identification number is not given and the screen is open (see Section 2.8.1 [open], page 25) then the material is selected using the mouse pointer.

If the first argument is node then information is returned for the node specified by the second argument. A node can be referred to by its order number or assigned identification number (the number you originally assigned.) In this way information can be obtained without knowledge of the original assigned numbering. If the order number is used then the argument must be positive (or zero since order numbers are zero based.) Otherwise, negative numbers are interpreted as identification numbers (indicated by the absolute value.) The data returned is the order number, node id, and the node x,y coordinates (referenced to the coordinate origin.) If the polar coordinate system is set (see Section 2.7.3 [coord], page 16) then the coordinate data returned will be in polar form (a radius and angle, referenced to the coordinate system origin.) If the node identification number is not specified and the screen is open (see Section 2.8.1 [open], page 25) then the node is selected using the mouse pointer.

If the first argument is elem then information is returned for the element specified by the second argument. An element can be referred to by its order number or assigned identification number (the number you originally assigned, as above.) The data returned is the order number, element id, material id, number of nodes, and the node order numbers (not the node ids.) If the element identification number is not specified and the screen is open (see Section 2.8.1 [open], page 25) then the element is selected using the mouse pointer.

If the first argument is pbc then information is returned for the point boundary condition on the node specified by the second argument (see above) for the degree of freedom specified. The data returned is the node order number, node id, boundary condition type, kind, degree of freedom, and the boundary condition value. If no boundary conditions (associated with the current problem kind) exist for the node then only the node order number and node identification number are returned. If the node identification number is not specified and the screen is open (see Section 2.8.1 [open], page 25) then the node is selected using the mouse pointer.

If the first argument is dbc then information is returned for the distributed boundary condition on the element, side, and degree of freedom specified. The data returned is the element order number, element id, element side, boundary condition type, kind, degree of freedom, and the boundary condition values (one for each node along the element side.) If no boundary conditions (associated with the current problem kind) exist for the element side then only the element order number, identification number, and side are returned. If the element identification number is not specified and the screen is open (see Section 2.8.1 [open], page 25) then the element side is selected using the mouse pointer.

If the first argument is soln then a solution value is returned for the degree of freedom and node specified. The data returned is the node order number, node id, and solution value (associated with the current problem kind.) If the node identification number is not specified and the screen is open (see Section 2.8.1 [open], page 25) then the node is selected using the mouse pointer.

If the first argument is group then information on groups is returned. The second argument (if specified) is the name of the group. The data returned is the number of nodes contained in the group. If the group name is not specified then a list of group names is returned.

If the first argument is window then data is returned containing the window maximum and minimum coordinates in the form of xmin, xmax, ymin, ymax (as specified in the window command.)

2.7.8 version

     'version'

This command returns the version and the compilation date for Ami2D.

2.7.9 stop

     'stop'

This command will cause Ami2D to exit thereby removing the code from memory. Any subsequently issued macros that reference Ami2D will fail unless it is restarted. There are no arguments to this command.

2.7.10 set

     'set(function,expr)'
         where:  function ≡ function name
                 expr ≡ algebraic expression
     example -> 'set tau12=(0.25*(sigr-sigz)^2+taurz^2)^0.5'
     example -> 'set material 2'

This command is used to define functions used to post-process solution data and to store intermediate data for exchange between macros. Pre-defined variable names may be used in the function expression as well as any other defined function names. Material coefficients may be referenced by using the pre-defined variables, c1 through c10, which refer to the coefficients as input in the mat command. Body force components may be accessed through the pre-defined variables, f1 through f4 (see Section 2.3.1 [mat], page 8). The pre-defined variables for plane (see Section 2.2.2 [plane], page 7) problems are:

     u# - solution value
     x# - solution derivative with respect to 'x' or 'x' coordinate
     y# - solution derivative with respect to 'y' or 'y' coordinate

The pre-defined variables for axisym (see Section 2.2.3 [axisym], page 7) problems are:

     u# - solution value
     r# - solution derivative with respect to 'r' or 'r' coordinate
     z# - solution derivative with respect to 'z' or 'z' coordinate
     t# - solution derivative with respect to 't'

Where the # symbol is replaced by the desired degree of freedom or is specifed as zero (0) if coordinate values are desired.

The function expression may be any valid algebraic expression which can contain any combination of operators, pre-defined variables and other defined functions. The expressions may also contain parenthesized sub-expressions, nested to any level. The allowed operators are +, -, *, /, and ^(real exponent.) Also built-in functions sin and cos are available as well as the variable pi. These were provided primarily for coordinate transformation. The function name may be given as the first argument or as the left hand side of the expression separated by an =. The latter option should be used for functions while the previous option should be used for defining constants. Also, no parentheses should be used to delimit the arguments because of possible conflicts with parentheses used in functions.

2.7.11 get

     'get(function)'
         where:  function ≡ function name
     example -> 'get(material)'

This command is used to retrieve a function or alias expression defined by the set (see Section 2.7.10 [set], page 20) and alias (see Section 2.7.13 [alias], page 23) commands. The argument is the function or alias name. The function or alias expression is returned in the ARexx variable RESULT (assuming that options results was specified in the macro.)

2.7.12 group

     'group(name,"add",n1,n2)'
     'group(name,"rem",n1,n2)'
     'group(name,"tran",x1,y1,x2,y2)'
     'group(name,"del")'
     'group(name,"save")'

     'group(name,"read")'
         where:  name ≡ group name
                 n1 ≡ starting node identification number
                 n2 ≡ ending node identification number
                 x1,y1 ≡ starting coordinate
                 x2,y2 ≡ ending coordinate
     example -> 'group(part,add,1,25)'

The group commands allow for manipulation of groups of nodes and associated elements. In general, groups are composed of nodes only, however, elements and boundary conditions associated with nodes contained in a group will be affected by group manipulation. Group names may be any length, but only the first nine characters are significant.

The add option is used for group creation. If the group does not exist then a new group is created otherwise the existing group will be added to. The two subsequent arguments specify the nodes (by identification number) to be added as a sequence of nodes starting with node n1 and ending with node n2. If n2 is given as zero then all nodes starting at n1 upto the last node in the model will be added. If neither argument is given and the screen is open (see Section 2.8.1 [open], page 25) then the nodes are selected by use of the mouse. Nodes are selected by dragging rectangles around nodes to be added. To terminate the selection process press the right mouse button.

The rem option is used to remove nodes from an existing group. This command is not destructive (no nodes are deleted.) The two subsequent arguments specify the nodes (by identification number) to be removed as a sequence of nodes starting with node n1 and ending with node n2. If n2 is given as zero then all nodes starting at n1 upto the last node in the model will be removed. If neither argument is given and the screen is open (see Section 2.8.1 [open], page 25) then the nodes are selected by use of the mouse. Nodes are selected by dragging rectangles around nodes to be removed. To terminate the selection process press the right mouse button.

The tran option is used to translate an existing group. The subsequent arguments specify the starting coordinate and ending coordinate for the translation. These coordinates are specified in either cartesian or polar form depending on the setting given in the coord command (see Section 2.7.3 [coord], page 16). It should be noted that the meaning of “translation” is different depending on the coordinate form. In cartesian coordinates a translation is defined as a movement in the global x and y directions. In polar coordinates a translation is defined as a movement in the radial and angular directions. This effectivily will result in rotation, translation and scaling in the most general use. This feature can be utilized with great effectiveness if used properly. If no arguments are given and the screen is open (see Section 2.8.1 [open], page 25) then the two positions are selected by use of the mouse.

The del option is used to delete nodes contained in an existing group. This command is destructive (so beware.) All nodes and associated elements and boundary conditions will be deleted from the model.

The save option is used to save a group to an IFF binary file (see Section 2.7.1 [save], page 15). Only nodes and associated elements (elements whose nodes are all contained in the group) are saved.

The read option is used to read in a group from an IFF binary file (see Section 2.7.1 [save], page 15). If the named group exists then the nodes (and elements) read in will be added to the group. If the group does not exist a new group will be created. The node (and element) identification numbers will start after the maximum identification number in the current model (in other words, no nodes or elements will be overwritten.)

2.7.13 alias

     'alias(name,expr)'
         where:  name ≡ alias name
                 expr ≡ command expression
     example -> 'set la=a2*a3/((1+a3)*(1-2*a3))'
                'set mu=a2/(2*(1+a3))'
                'alias iso=mat(a1,0,0,la+2*mu,la+2*mu,la+2*mu,mu,la,la,0.0,la)'

This command is used to create aliases for built-in commands. In this manner Ami2D may be customized to many different applications. Aliases are defined through the use of the pre-defined variables a1 through a#. These pre-defined variables contain the argument entries of the alias command. For example, the alias iso shown above will have its arguments placed in the predefined variables a1 through a3. These arguments are then used in the alias definition as well as in functions used in the alias definition. In this case, an isotropic material definition command was created from the more complex mat command. In actual use the iso alias command might look like the following.

                'iso(1,10.e6,0.3)'

Note that functions may be used in aliases with no restrictions (although some uses may not make any sense.) Aliases, however, may not be used in other aliases or functions. Also note that functions containing the pre-defined variables a1 through a# only make sense when used with aliases.

2.7.14 why

     'why'

This command will return the last error message associated with an error condition in the ARexx variable RESULT (assuming options results is used in the macro.) If an error occurs the ARexx variable RC will contain a severity level. Refer to references on the ARexx language for details on error handling (see Chapter 5 [References], page 37). Upon receiving an error condition this command can be used to help determine what error actually occurred.

2.8 Graphic Interactive Commands

The following commands comprise the graphical interactive interface builtin to Ami2D. Of course, all previously discussed commands will also function, but these commands (except open and window) are only valid for use with the public screen opened by the open command (see Section 2.8.1 [open], page 25).

It should be noted that most interactive commands may be aborted by pressing the right mouse button. This includes all previously discussed model creation commands.

2.8.1 open

     'open(xoff,yoff)'
         where:  xoff ≡ x offset in pixels
                 yoff ≡ y offset in pixels
     example -> 'open(50,40)'

This command will open the public screen for Ami2D. The name of the screen is AMI2D (what else) and can be accessed by other applications. Typically, this command will only be used from within a startup macro (see Section A.1 [ami2d.rexx], page 39 for an example of a startup macro for Ami2D.) The size of the screen will be set to the maximum display size and the depth of the screen will be 4 bit-planes (16 displayable colors.) The arguments to this command specify offsets to the backdrop window (i.e. the area where all graphics are rendered) left hand side and top edge in pixels. If either offset is negative then the offset will be relative to the right hand side and bottom edge respectivily. The window will also be reduced by the amount of the offsets. This allows for placement of other windows without obscuring the display.

2.8.2 close

     'close'

This command will close the public screen, if possible. The screen will not close if visiting windows are still open on the screen. This command will have to be reissued, if the screen could not be closed, after all visiting windows are closed. There are no arguments to this command.

2.8.3 plot

     'plot(type,scale)'
         where:  type ≡ "model", "deform", "bcs", "bound"
                 scale ≡ deformation scale
     example -> 'plot(bcs)'

This command will plot the nodes and elements of the model. If no arguments are specified then the model will be plotted. If deform is specified for the first argument then displacements (actually, any solution with two degrees of freedom will be treated as displacements by this command, so beware) are added to the nodal coordinates. Optionally, a third argument specifies a deformation scale which by default is 1 (giving actually deformation.) If bcs is specified for the first argument then all boundary conditions are plotted. If bound is used then free boundaries (unconnected element edges) will be highlighted. The last option is useful for determining if any nodes need to be equivilenced (see Appendix E [Equ2D], page 50).

2.8.4 fill

     'fill("model")'
     'fill("deform",scale)'
         where:  scale ≡ deformation scale
     'fill("result",comb,rmin,rmax)'
         where:  comb ≡ result combination ("max", "min" or "ave")
                 rmin ≡ minimum result value
                 rmax ≡ maximum result value
     example -> 'fill(deform,2)'
     example -> 'fill(result,ave,0.0,100.0)'

This command will plot the elements of the model and fill them with a color dependent on the material assigned to the element. If no arguments are specified then the model will be plotted. If deform is specified for the first argument then displacements (actually, any solution with two degrees of freedom will be treated as displacements by this command, so beware) are added to the nodal coordinates. Optionally, an additional argument specifies a deformation scale which by default is 1 (giving actually deformation.) If result is specified for the first argument then the elements will be filled with a color dependant on the results calculated by the post command (see Section 2.6.2 [post], page 13, which must be issued before this command can be used.) Additional arguments may be given to indicate how to combine the results within an element and to give the range of result values. Result combination may be specified as max, min or ave. These options will give either the maximum, minimum or average value of the results calculated within each element respectivily. If not specified then max is assumed. Finally, a range of values may be given by specifying the minimum and maximum result values. If not given then the range is set to include the the full range of values calculated by the post command.

2.8.5 window

     'window(xmin,xmax,ymin,ymax)'
         where:  xmin ≡ minimum x coordinate
                 xmax ≡ maximum x coordinate
                 ymin ≡ minimum y coordinate
                 ymax ≡ maximum y coordinate
     example -> 'window(-10.0,20.0,0.0,30.0)'

This command is used to specify world coordinates for the window. If no arguments are given then the window is selected using the mouse by pressing and holding the left mouse button and dragging the box until the region of interest is enclosed. The arguments are the minimum x, maximum x, minimum y and maximum y coordinates in that order.

2.8.6 grid

     'grid(xinc,yinc)'
         where:  xinc ≡ x or r increment
                 yinc ≡ y or t increment
     example -> 'grid(0.5,0.25)'

With this command an invisible grid is created. Subsequent node, element and boundary condition selection will be restricted to coordinates that fall on the grid points. The arguments are the x and y (or r and t if the coordinate system is set to polar, see Section 2.7.3 [coord], page 16) grid increments specified in world coordinates.

2.8.7 find

     'find'

This command will reset the window to include the full model. The model will be replotted. There are no arguments to this command.

2.8.8 zoom

     'zoom(factor)'
         where:  factor ≡ zoom factor
     example -> 'zoom(0.5)'

This command will increase or decrease the window size dependent on the specified argument. A value of one will cause no change. Values less than one will shrink the window (zoom in) whereas values greater than one will expand the window (zoom out.) If no argument is given then the window is expanded or shrunk interactively by pressing and holding the left mouse button and moving the mouse.

2.8.9 move

     'move(xfract,yfract)'
         where:  xfract ≡ x screen fraction
                 yfract ≡ y screen fraction
     example -> 'move(-.5,0.0)'

This command is used to move the window along the x and y directions. The arguments specify the x and y move in terms of screen fraction. Values of zero cause no change for that direction. A value of one will cause a shift of a full screen width or height (depending on the direction specified) in the positive direction (right or up.) If no argument is given then the window is moved interactively by pressing and holding the left mouse button and moving the mouse.

2.8.10 clear

'clear'

This command will clear the screen. There are no arguments to this command.

2.8.11 show

'show("node",n,flag)'
'show("elem",n,flag)'
'show("group",name)'
    where:  n ≡ node or element identification number
            flag ≡ 0 - nolabel, 1 - label
            name ≡ group name
example -> 'show(group,part)'

This command will plot (in complementary mode) the requested item(s). If flag is set to 1 then the corresponding node or element identification number will be plotted next to the item. If the group option is specified all nodes in the group will be plotted.

3 Discussion

The following sections discuss some of the finer details concerning the use of Ami2D.

3.1 Modeling Considerations

Since the stiffness matrix resulting from the finite element descretization is generally large, sparse and is always symmetric, storage space and computational requirements can be reduced by minimizing the bandwidth of the stiffness matrix. The bandwidth of the stiffness matrix is directly related to the maximum separation in node order in each element. It should be noted that the node ordering, not the assignment of node identification numbers, affects the bandwidth. For rectangular grids the minimum bandwidth can be achieved by defining the nodes in the direction defined by the shorter side. For non-rectangular grids it is not so apparent how to order the grid to achieve the minimum bandwidth. A rule of thumb is to try to keep the difference between the earliest defined node and latest defined node within any element to a minimum. The absolute worst ordered grid would be to have an element that contains both the first defined node and the last defined node.

It is also important to keep local node numbering within all elements ordered in a counterclockwise direction to avoid negative Jacobians. It is also good practice to number this way as a habit in order to maintain model consistency.

A node order optimizer called Opt2D is included with this distribution. For poorly ordered grids this optimizer can significantly reduce the bandwidth and therefore reduce memory requirements and execution times. However, for low aspect ratio rectangular grids with well ordered nodes the optimizer can increase the bandwidth. Documentation is provided for Opt2D.

3.2 Element Instability

All element configurations exhibit “spurious” modes (instabilities) which can typically be prevented through proper boundary condition specification. These modes can be described as zero energy modes where certain nontrivial solutions produce no energy. An example of a zero energy mode is rigid body motion (translation and/or rotation.) Through proper application of displacement (Dirchlet) boundary conditions, rigid body motions can be prevented. However, some element configurations exhibit additional “spurious” modes some of which render the element unusable. Proper selection of element order and number of integration points can prevent these extra modes from occuring, however, over-integration is also undesirable due to the additional (typically unnecessary) computational requirements.

To determine if an element is usable one must solve the eigenvalue problem associated with the particular element configuration (that is find all eigenvalues and associated eigenvectors that satisfy the equation Ku = cu, where K is the element stiffness matrix and c and u are the eigenvalues and eigenvectors.) The eigenvectors associated with any zero eigenvalues represent a basis defining (spanning) the null space of K (i.e. any vectors contained in this space may be represented as a linear combination of the basis vectors defining the space.) That is these eigenvectors (and any linear combination of these vectors), if operated on by K, result in no reactive force (no energy produced.) Applying these zero energy eigenvectors to the nodal coordinates one obtains a visual representation of the zero energy modes.

To illustrate, consider the vector valued displacement problem using the eight node element with a 2x2 integration rule. The number of zero energy modes, for this element, is four (found by subtracting the rank of the element stiffness matrix from its order.) These modes correspond to the expected three rigid body motions (two translations and one rotation) plus an extra “spurious” mode. However, this element is still usable since this extra mode is not communicable (adjoining elements provide constraint against this mode.) It can also be shown that for scalar valued problems (such as heat conduction problems) this element is over-integrated and exhibits no extra “spurious” modes.

For the same element order, but with a 3x3 integration rule instead, the number of zero energy modes is three which corresponds to the three possible rigid body motions. This element is in fact over-integrated thereby resulting in no extra “spurious” modes but at a cost of doing more calculations (and not necessarily gaining any accuracy.)

To further illustrate, consider the vector valued displacement problem using the nine node element with a 2x2 integration rule. The number of zero energy modes, for this element, is six. The extra zero energy modes found for this element are all “spurious” modes some of which are communicable thereby rendering this element unusable. With a 3x3 integration rule this element is over-integrated but is the element of choice since the 2x2 integration rule results in an unusable element.

3.3 Post-Processing Accuracy

The accuracy of the results obtained from the finite element method can depend heavily on where evaluation of the solution is performed. The locations, within a particular element, where the results (based on solution derivatives) are the most accurate have been shown to coincide with the Gaussian quadrature points with the order of the Gaussian rule chosen to be the same as the order of the element. The capability to output results at these locations is an option with the post command (see Section 2.6.2 [post], page 13) and should be used when the solution derivative is known to be changing rapidly across an element. Unfortunately, the Gaussian quadrature points are typically interior points which do not coincide with the nodal point locations. Therefore, if results must be output for nodal point locations it is suggested that the mesh be refined in areas where the solution is expected to vary significantly.

3.4 Graphic Interaction with Ami2D

Ami2D contains commands that allow you to graphically interact with the code through its ARexx port. These commands were discussed above in detail, but it should be apparent that more is needed to integrate your input with this graphical interface. Hence the inclusion of the ancillary codes - rexxcon and rexxbar. The code rexxcon simply provides a console window which accepts input in a command line shell environment. For Ami2D an ARexx macro is provided (called ‘ami2d.rexx’) that starts up Ami2D and uses rexxcon to open a console window on the Ami2D public screen. Commands typed in this console window are read by the ARexx macro and then issued to Ami2D. This allows you to type commands directly in the console without the need to address Ami2D or surround the commands with quotes. The ‘ami2d.rexx’ macro also allows any AmigaDOS command to be issued by preceding the command with a !. An example session using ‘ami2d.rexx’ is given below.

The other code provided is rexxbar which ‘ami2d.rexx’ uses to open another window on the Ami2D screen. This window contains buttons that when selected cause other ARexx macros to be executed. The macros associated with these buttons in turn send commands to Ami2D.

Both rexxcon and rexxbar are completely tailorable. For rexxcon the window specification can be altered to any preferred size and placement. Also any valid console device can be specified (for example WShell or the conman console devices by William Hawes may be used thereby providing the full capabilities of those devices in the rexxcon window.) The buttons and associated macros used in rexxbar can also be tailored as well as the size and placement of the window. A description of the interface as provided by the ‘ami2d.rexx’ macro (and associated macros, ‘rexxcon.rexx’ and ‘rexxbar.rexx’) would be futile because of this flexibility. Therefore, a separate appendix (see Appendix B [Ami2D Macros], page 41) is provided that describes the interface as implemented in this distribution. Also separate appendices are provided for rexxcon (see Appendix G [Rexxcon], page 52) and rexxbar (see Appendix H [Rexxbar], page 56) which give a general description of the codes for use in applications. A flow diagram illustrating the interaction of all the components set up by the ‘ami2d.rexx’ macro is shown in figure 2.

Figure 2 – ami2d.rexx flow diagram

The following example session using the ‘ami2d.rexx’ macro (and associated macros) assumes that the distribution remains intact and that the installation procedure has been followed correctly.

To execute the ‘ami2d.rexx’ macro double click on the Ami2D icon. A screen should open with two windows appearing soon after. In the console window (at the bottom of the screen) type the following commands.

     -> node 1 0 0
     -> node 2 10 0
     -> set inodes 21
     -> set jnodes 3
     -> set igrad .5

Now select the button labeled genln in the window along the right hand side of the screen. The two nodes created above will need to be selected starting with the first node. After selecting the nodes (by clicking the left mouse button with the pointer near each of the desired nodes) a line of nodes should have been created. Now type the following commands in the console.

     -> node 0 0 1
     -> node 0 10 1

And again select the button genln and the two new nodes created. Another line of nodes should have been created. Now select the button genrg and select the four corner nodes in the counterclockwise direction starting from the first created node. A region of nodes should have been created. Then type the following.

     -> iso 1 4500 .4995
     -> iso 2 10.e6 .3
     -> set material 1

Then select the button genq4 and select three corner nodes starting with the lower left corner, then the lower right corner and finally the upper right corner. Elements should have been created. Type the following command.

     -> grid 1 0.25

Select the button labeled node and move the pointer to coordinates (0,1.25). The coordinates should be displayed in the screen title bar. The grid command given above restricts coordinates to the increments specified by the arguments. Create the node by clicking the left mouse button on this coordinate. Do the same thing for another node at coordinate (10,1.25). Type the following command.

     -> set material 2

Again select the button genln and select the two nodes just created above. Then select the button genq4 and select three corner nodes starting with the node at coordinate (0,1) then the node at (10,1) and finally the node at (10,1.25). More elements should have been created. Select the button labeled fill. This should have produced a plot with the elements filled with colors differentiating the materials used. Now select the button labeled dispx and select the node in the lower left corner. Repeat this for each node on the left end of the beam. Select the button labeled dispy and select the lower left corner node. This last series of operations created zero displacement boundary conditions to anchor the left end of the bar. Now type the following command.

     -> set force -100

Then select the button labeled forcy and select the node in the upper right hand corner. This should have placed a force boundary condition applied in the downward direction. Type the following commands.

     -> check
     -> save ram:test.dat

Select the button lin2d which runs the Lin2D linear solver to solve the problem. The status of Lin2D can be checked by typing the following command (which is another ARexx macro.)

     -> !ami2d:rexx/solstat

Chances are good that by the time the command is typed the job will have already finished (which would be indicated by an error message.) When Lin2D finishes the model and results are read back in (and the model is plotted.) Type the following command.

     -> set scale 10

Select the button labeled fill then select the button labeled fdef. This will result in a deformed plot on top of the undeformed plot. Congratulations you have just modeled, solved and postprocessed a finite element analysis problem.

4 Example Problem

The following macro is included as a simple example to illustrate the use of an ARexx macro to generate a model. The advantages of using an ARexx macro are ease of debugging and the use of parametric variation to name a couple. This macro can be executed as any ARexx macro and will produce a model file ready to be solved by Lin2D. Ami2D is automatically invoked, by the macro, if it is not already running.

/* simple beam */
options results
if ~show('ports', "AMI2D") then do
    address command 'run ami2d:bin/ami2d ami2d:rexx/init'
    do while ~show('ports', "AMI2D")
    end
end
address ami2d
h = 0.5
L = 10.0
E = 10.0e6
nu = 0.3000
reset
problem 'struct'
plane
iso 1 E nu
do i=0 to 20
    xx = L*i/20
    node i+1 xx 0.0
    node i+31 xx h
end
do i=0 to 19
    quad4 i+1 1 i+1 i+2 i+32 i+31
end
dispx 1 0.0
dispy 1 0.0
dispx 31 0.0
dispy 31 0.0
forcy 51 (-100.0)
check
say result
save 'beam.dat'
exit

5 References

1. Hawes, William S., ARexx User’s Reference Manual

2. Becker, Eric B., Carey, Graham F., Oden, J. Tinsley, Finite Elements, An Introduction, Volume 1, Prentice-Hall Inc., 1981

3. Zienkiewicz, O.C., Taylor, R.L., The Finite Element Method, Volumes 1 & 2, Fourth Edition, McGraw-Hill Book Company, 1991

4. Schildt, H., C, The Complete Reference, Second Edition, Osborne McGraw-Hill, 1990

6 Acknowledgements

I acknowledge Commodore and the Amiga crew for producing the hardware and operating system of unmatched elegance that makes up the Amiga line of computers. The power and flexibility of this hardware and software combination makes possible the development of sophisticated and efficient programs that are only possible on this platform. I would also like to acknowledge William Hawes and Willy Langeveld for their contributions to the power of the Amiga’s operating system through the development of ARexx and the rexxmathlib, rexxarplib libraries. The addition of ARexx to the current operating system has, in my opinion, placed the Amiga’s operating system in the forefront of OS technology and provides unparalleled programming flexibility when combined with the truely multitasking environment of the Amiga computers. As a programmer and engineer I have found (especially with the development of Ami2D) that I have become very spoiled by the Amiga’s capabilities. There literally is no other computer platform which I would choose to attempt to produce code for.

I would also like to acknowledge Dr. Eric Becker and Dr. Linda Hayes, of the Aerospace Engineering and Engineering Mechanics Department of The University of Texas at Austin, for passing on the knowledge of the finite element method directly and indirectly through course work and research assistance. It is this knowledge that made possible the development of Lin2D and Nln2D. In fact, both codes started out as course term projects directed by Dr. Hayes and Dr. Becker.

Appendix A ARexx Scripts

The following are brief descriptions of the ARexx scripts found in ‘ami2d:rexx’.

A.1 ami2d.rexx

This script sets up Ami2D to be used interactivily. It may be executed directly from the command line or by double clicking on the Ami2D icon. The script executes Ami2D and calls other scripts to setup rexxcon and rexxbar (see Appendix B [Ami2D Macros], page 41 for a description of the macros available through rexxbar.) It then goes into an infinite loop which continuously issues a read command to rexxcon to obtain commands typed into rexxcon’s window. These commands are in turn issued to Ami2D. However, if the command starts with a ! then the command is issued to the command line (AmigaDOS) instead. Also if the command is stop then the loop is exitted and all tasks are stopped. If for some reason this script fails then the tasks will not be properly terminated. If this occurs then the script ‘cleanup.rexx’ should be executed to force termination of remaining tasks.

A.2 cleanup.rexx

This script will force termination of all remaining tasks running that are part of the Ami2D environment.

A.3 solstat.rexx

This script gives the current status of the solver.

A.4 rexxbar.rexx

This script is used by ‘ami2d.rexx’ to setup the button window. It is only required by ‘ami2d.rexx’ and should not be executed as a standalone script. It does, however, serve as an example script for rexxbar.

A.5 rexxcon.rexx

This script is used by ‘ami2d.rexx’ to setup the console window. It is only required by ‘ami2d.rexx’ and should not be executed as a standalone script. It does, however, serve as an example script for rexxcon.

Appendix B Ami2D Macros

The following macros are used by rexxbar to provide some additional interactivity to Ami2D. These should also serve as examples which could be used to aid in the creation of other macros tailored to specific requirements.

‘clear’ ami2d:macros/clear — clears screen. ‘read’ ami2d:macros/read — bring up file requester to select file to read. ‘save’ ami2d:macros/save — bring up file requester to select file to save. ‘wind’ ami2d:macros/window — interactivily set window. ‘find’ ami2d:macros/find — find window that includes full model. ‘zoom’ ami2d:macros/zoom — interactivily expand/shrink window. ‘move’ ami2d:macros/move — interactivily move window. ‘plot’ ami2d:macros/plot — plot nodes and elements. ‘fill’ ami2d:macros/fill — fill plot elements. ‘pdef’ ami2d:macros/plotdeform — plot nodes and elements with displacements applied.

Scale factor can be set with the variable scale.

‘fdef’ ami2d:macros/filldeform — fill plot elements with displacements applied. Scale factor

can be set with the variable scale.

‘pbcs’ ami2d:macros/plotbcs — plot boundary conditions. ‘node’ ami2d:macros/node — create node by moving mouse to location and pressing the left

mouse button.

‘tri3’ ami2d:macros/tri3 — create a three node triangle element by selecting three existing nodes in the counterclockwise direction. The material number may be set with the variable material.

‘tri6’ ami2d:macros/tri6 — create a six node triangle element by selecting six existing nodes (corner nodes first, then midside nodes) in the counterclockwise direction. The material number may be set with the variable material.

‘quad4’ ami2d:macros/quad4 — create a four node quad element by selecting four existing nodes in the counterclockwise direction. The material number may be set with the variable material.

‘quad8’ ami2d:macros/quad8 — create an eight node quad element by selecting eight existing nodes (corner nodes first, then midside nodes) in the counterclockwise direction. The material number may be set with the variable material.

‘quad9’ ami2d:macros/quad9 — create a nine node quad element by selecting nine existing nodes (corner nodes first, then midside nodes, center node last) in the counterclockwise direction. The material number may be set with the variable material.

‘genln’ ami2d:macros/genline — create a line of nodes from two existing nodes. The number of nodes generated between (and including) the two nodes can be set with the variable inodes. A gradient in node spacing can be set with the variable igrad.

‘genrg’ ami2d:macros/genregion — create a region of nodes from two existing lines of nodes. The number of nodes generated between (and including) the two lines can be set with the variable jnodes. A gradient in node spacing can be set with the variable jgrad. The four corner nodes should be selected in the counterclockwise direction starting with the lowest numbered node.

‘genq4’ ami2d:macros/genquad4 — create a region of four node quad elements from an existing region of nodes by selecting three corner nodes of the region. The nodes must be selected in the counterclockwise direction starting with the lowest numbered node. The material number may be set with the variable material.

‘genq8’ ami2d:macros/genquad8 — create a region of eight node quad elements from an existing region of nodes by selecting three corner nodes of the region. The nodes must be selected in the counterclockwise direction starting with the lowest numbered node. The material number may be set with the variable material.

‘dispx’ ami2d:macros/dispx — create a displacement boundary condition in the x direction by selecting a node with the mouse. The value of the displacement may be set with the variable disp.

‘dispy’ ami2d:macros/dispy — create a displacement boundary condition in the y direction by selecting a node with the mouse. The value of the displacement may be set with the variable disp.

‘forcx’ ami2d:macros/forcx — create a force boundary condition in the x direction by selecting

a node with the mouse. The value of the force may be set with the variable force.

‘forcy’ ami2d:macros/forcy — create a force boundary condition in the y direction by selecting

a node with the mouse. The value of the force may be set with the variable force.

‘press’ ami2d:macros/press — create a pressure boundary condition by selecting an element with the mouse. The pressure will be applied to the side closest to the mouse selection. The value of the pressure may be set with the variable press.

‘tract’ ami2d:macros/tract — create a traction boundary condition by selecting an element with the mouse. The traction will be applied to the side closest to the mouse selection. The value of the traction may be set with the variable tract.

‘equ2d’ ami2d:macros/equ2d — invoke node equivilencer. No model file is saved or overwritten. ‘opt2d’ ami2d:macros/opt2d — invoke node order optimizer on current model. No model file

is saved or overwritten.

‘lin2d’ ami2d:macros/lin2d — invoke linear solver on current model. No model file is saved or

overwritten.

‘nln2d’ ami2d:macros/nln2d — invoke nonlinear solver on current model. No model file is saved or overwritten.

‘help’ ami2d:macros/help — this script invokes AmigaGuide with the database ‘Ami2D.guide’. This provides on-line help during an interactive session. AmigaGuide is required to use this macro. (AmigaGuide \begin{matrix}c \\ ◯ \end{matrix} Copyright 1992 Commodore-Amiga, Inc.)

Appendix C Lin2D

C.1 Introduction to Lin2D

Lin2D is a general linear solver developed to handle “plane” and axisymmetric two dimensional finite element analysis problems. It is a fairly general capability in the sense that a wide variety of two dimensional problems can be handled by Lin2D limited only by computational resources. Specific attention was given to efficient memory and resource management, however, the minimum recommended amount of memory needed to solve moderate problems, using Lin2D, is 6 megabytes (although simple problems can be run with considerably less.) A hard disk is also recommended.

It is important to note that any engineer, planning to use a finite element code for actual application, understand fully the concepts and implementation of the finite element method. Therefore, the prospective user should consider an in-depth study of the method and ideally some training. This document should not be considered appropriate for training users in the use of the finite element method.

The main features of Lin2D are as follows:

• runs as a background task

• two-dimensional plane or axisymmetric problems

• uses ARexx macro language

• linear and quadratic elements available

• no limit on number of nodes, elements, materials, or boundary conditions (only limited by memory)

• no need to specify problem size (determined at run time)

• choice of Dirchlet (constraint) or Neumann (flux), point or distributed boundary conditions

• symmetric banded matrix storage format

In general the command line syntax for executing Lin2D:

         -> [run] Lin2D [script]

where script is the name of an input ARexx script to be processed. If no script is specified then the code will wait until it receives a command, presumably from a subsequently executed ARexx command or script.

Lin2D accepts ARexx commands passed to its message port (address lin2d.) Commands for Lin2D, placed in an ARexx macro, consist of a command keyword followed by arguments. The arguments may be separated from the command keyword with parentheses and delimited with commas (analagous to a function call) or may be separated (and delimited) with spaces. If parentheses and commas are used then the command line must be surrounded by single quotes or else ARexx will interpret the command as a library function call (rather than a command meant for the host.) The general rule is to surround expressions (which can be single variables), which are to be interpreted internally by Lin2D, with single quotes. Otherwise, expressions (and variables) will be interpreted by ARexx before being sent to Lin2D.

C.2 Model Requirements

The constitutive law implemented in Lin2D (relating stress and strain in structural problems, for example) consists of a linear matrix operator with up to ten independant constants. These constants are input in the mat command in Ami2D as the material coefficients. For structural problems the components of stress and strain, relevent to plane or axisymmetric problems, are the three normal components plus the in-plane shear component. This requires that the material matrix operator be a four by four matrix. This results in sixteen constants but, due to elastic symmetry, only ten of these constants are independant. The material coefficients allow for specification of materials ranging from isotropic (properties invariant to material direction) to monoclinic (properties symmetric about one plane.) The coefficients are specified in diagonal order and the matrix is symmetric. In other words, if the coefficients are arranged in matrix form they would appear as follows.

                 C0  C4  C7  C9
                 C4  C1  C5  C8
                 C7  C5  C2  C6
                 C9  C8  C6  C3

Body forces are also input with the mat command. Lin2D treats the two sets of body forces differently. The first set of body force terms are for body forces arising from internal energy. For example, thermal strain in a material develops as a result of a change in temperature in the material which can be treated as a body force due to a change in internal energy. The second set of body force terms are for body forces arising from potential energy such as conservative force fields (gravity or acceleration being an example.) Furthermore, for axisymmetic problems the radial component of this conservative body force is multiplied by the radial location. This, for example, allows for a radial force component that depends on the radial acceleration arising from the steady state rotation of an axisymmetric body.

Also, if the specified couple problem kind does not correspond to the current problem kind then the reference values are used to calculate a difference in solution value (obtained from a previous analysis corresponding to the specified couple problem kind) from these reference values. The body forces are, in turn, multiplied by these calculated differences.

C.3 Lin2D Commands

The commands are functionally equivilent to commands available in Ami2D. Additional commands are also provided which are described in the following sections.

• save (see Section 2.7.1 [save], page 15)

• read (see Section 2.7.2 [read], page 15)

• reset (see Section 2.7.5 [reset], page 16)

• version (see Section 2.7.8 [version], page 19)

• stop (see Section 2.7.9 [stop], page 20)

• why (see Section 2.7.14 [why], page 24)

C.4 formkf

     'formkf(iprint)'
         where:  iprint ≡ print flag (0 for no print, 1 for print)
     example -> 'formkf(0)'

This command forms the stiffness matrix and load vector. The stiffness matrix and load vector are assembled from the individual element contributions which results in a linear system of equations to be subsequently solved. The only argument to this command is a print flag. A value of 1 indicates that the stiffness matrix and load vector will be printed to the standard output. This is not recommended for problems resulting in large systems. A value of 0 will result in no matrix/vector output (the default setting.)

C.5 solve

     'solve(iprint)'
         where:  iprint ≡ print flag (0 for no print, 1 for print)
     example -> 'solve(0)'

This command will attempt to solve the system assembled using the formkf command (see Section C.4 [formkf], page 46). Simple checks of the model are performed at various stages, but this does not insure that the system can be solved. The user must pay special attention to correctness of model geometry and boundary conditions. If the system is not solvable it is most probably due to errors in the geometry and/or boundary conditions. The only argument to this command is a print flag. A value of 1 indicates that the solution vector will be printed to the standard output. This is not recommended for large problems. A value of 0 will result in no solution output (the default setting.)

C.6 status

     'status'

This command allows the user to check on the status of the assembly and solution of the problem. This command is usually used in a separate macro issued during the execution of the macro performing the actual analysis. There are no arguments to this command.

C.7 abort

     'abort'

This command will cause the currently executing command to abort. This command is usually used in a separate macro issued during the execution of the macro performing the actual analysis. There are no arguments to this command.

Appendix D Nln2D

This solver is equivilent to Lin2D except that it is restricted – results are only valid for – structural analysis problems where large displacements (and/or rotations) are expected, but small strain theory still applies. A good example would be the large deflection of a thin cantilever beam. The functional difference between Nln2D and Lin2D is the solution process. The first iteration through formkf and solve will result in a linear solution (equivilent to the solution given by Lin2D.) Subsequent executions of formkf and solve will produce results that represent a lower total energy state (the internal energy approaches the external energy of the system.) After “enough” iterations have been performed the total energy should be zero (that is an equilibrium state should have been reached.) The command formkf returns the maximum (absolute value) nodal residual force in the system. This value can be checked against a tolerance value (typically around 0.01, but depends on loading conditions) as a stopping criteria. Also, the solve command returns the maximum (absolute value) change in nodal displacement. This value may also be checked against a tolerance value (typically around 0.0001) as a stopping criteria. The following is an example script showing a solution procedure.

     /* example script for nln2d */
     options results
     address nln2d 'read(ram:temp.dat)'
     do i=0 to 20
         address nln2d 'formkf'
         address nln2d 'solve'
         parse var result du
         if du < 1e-4 then leave
     end
     address nln2d 'save(ram:temp.dat)'
     exit

This code can be more effectivily used when run in conjunction with Ami2D. For instance, intermediate results can be viewed graphically thereby given a visual indication of solution convergence. It is even possible (and often desirable) to assemble an animation consisting of these intermediate results. This animation would show, very effectivily, the convergence process.

Also, convergence of the solution may require incremental loading which can be accomplished with the aid of Ami2D. This would be done by applying a fraction of the appropriate load(s), performing an iterative solution with Nln2D until convergence, then increasing the load fraction using Ami2D and repeating the solution procedure. This whole process is repeated until the full load is reached.

Currently, only a linear elastic stress-strain material law is implemented thereby restricting problems to those where small strains are expected. However, future additional material constitutive laws will be implemented thereby extending the code applicability to more general nonlinear problems.

Appendix E Equ2D

Given a two-dimensional finite element mesh (stored in the IFF format currently used by Ami2D) Equ2D will equivilence nodes that fall within a specified tolerance apart. Either an inclusion or exclusion node group may be given to restrict the equivilence operation.

The equivilence operation is typically used as a modeling tool to “weld” separate parts together or to close gaps. This operation is particularly useful during interactive modeling since complex assemblies are easier to build from parts.

The command line syntax for Equ2D is:

         -> [run] equ2d [-igroup] [-xgroup] [-ttol] <input> [output]

where input is the input data file containing the finite element data (in the form produced by the save command in Ami2D.) This input data file is a required argument. The output data file, if specified, will be the name of the file that will contain the equivilenced finite element data. If not specified then the data will be written back to the input file (thereby overwriting the previous data.) If the -i option is used then group specifies the group containing the nodes to be included in the equivilence search. Likewise, if the -x option is used then group specifies the group containing nodes to be excluded from the equivilence search. If the -t option is given then tol specifies the tolerance to be used to determine equivilence (the default is 1.0e-5).

Appendix F Opt2D

Opt2D is a node order optimization program for arbitrary two dimensional finite element meshes. The algorithm used to optimize the mesh is fairly simplistic but may result in a smaller bandwidth for some problems. For simple rectangular meshes, if the node ordering is consistent, then Opt2D will probably give a node ordering with a bandwidth that is larger than the original. However, for irregular meshes, very high aspect ratio meshes, or inconsistently ordered meshes, Opt2D can reduce the bandwidth significantly. A side effect of Opt2D is that all unreferenced nodes will be removed resulting in a further reduction in model size and memory requirements.

The command line syntax for Opt2D is:

         -> [run] opt2d [-nelement] <input> [output]

where input is the input data file containing the finite element data (in the form produced by the save command in Ami2D.) This input data file is a required argument. The output data file, if specified, will be the name of the file that will contain the optimized finite element data. If not specified then the optimized data will be written back to the input file (thereby overwriting the previous data.) If the -n option is used then element specifies the identification number of the element where the optimization search is to begin. Proper selection of the starting element can dramatically improve the resulting optimization.

Appendix G Rexxcon

rexxcon is a very simple ARexx host program who’s only function is to read lines from a console and return them to the calling macro. The primary function of this program is to serve as an interactive front-end to other ARexx hosts.

The command line syntax for rexxcon is:

         -> [run] rexxcon [-p] [-hhostname] [script]

where script is the name of an input ARexx script to be processed. If no script is specified then the code will wait until it receives a command, presumably from a subsequently executed ARexx command or script. If the -p option is used the code will echo commands as received from ARexx. The -h option will set the host address to hostname.

G.1 Example Script for rexxcon

Commands for rexxcon, placed in an ARexx macro, consist of a command keyword followed by arguments. The arguments may be separated from the command keyword with parentheses and delimited with commas (analagous to a function call) or may be separated (and delimited) with spaces. If parentheses and commas are used then the command line must be surrounded by single quotes or else ARexx will interpret the command as a library function call (rather than a command meant for the host.) The general rule is to surround expressions (which can be single variables), which are to be interpreted internally by rexxcon, with single quotes. Otherwise, expressions (and variables) will be interpreted by ARexx before being sent to rexxcon. For example the lines below show a sequence of ARexx commands for rexxcon.

     /* this is an ARexx macro for rexxcon */
     options results
     parse arg host
     hostname = upper(host)
     if ~show('ports',hostname) then do
         address command 'run ami2d:bin/'host
         do while ~show('ports',hostname)
         end
     end

address VALUE hostname
hostname = 'RXC_'hostname
say hostname
if ~show('ports',hostname) then do
    address command 'run ami2d:bin/rexxcon -h'hostname
    do while ~show('ports',hostname)
    end
end
address VALUE hostname
'open(cnc,0,-50,-52,50,'host'/noclose,'host')'
do forever
    'read'
    comm = result
    drop result
    address
    comm
    address
    if comm = 'stop' then leave
    if result ~= "RESULT" then 'write('result')'
end
'stop'
exit

The above example is in fact an ARexx script that could used to run Ami2D interactivily. It illustrates the use of rexxcon as a “front end” to ARexx hosts.

G.2 open

'open(conspec,left,top,width,height,flags,screen)'
    where:  conspec ≡ the console specification
            left ≡ left edge offset (right edge offset if negative)
            top ≡ top edge offset (bottom edge offset if negative)
            width ≡ window width (relative to screen width if negative)
            height ≡ window height (relative to screen height if negative)
            flags ≡ console device flags (typically starts with title)
            screen ≡ public screen name
example -> 'open(con,0,1,640,200,rexxcon/noclose)'

This command will open the rexxcon console window. The command requires arguments defining the console specification. The arguments are the console device name (without the colon), left (or right) edge offset, top (or bottom) edge offset, width (can be relative to screen width), height (can be relative to screen height), flags and public screen name. The edge offsets will be relative to the left and/or top edges if positive or zero otherwise they are relative to the right and/or bottom edges respectivily. The width and/or height, if positive, directly specify the window width and/or height. If they are negative then they will be relative to the screen width and/or height. If the public screen name is not specified then the window will be opened on the Workbench screen.

G.3 close

     'close'

This command will close the console window.

G.4 read

     'read'
         returns:    a string containing the line

This command will read a line from the rexxcon console (or file.) The line will be returned in the ARexx variable RESULT if options results was specified in the ARexx macro.

G.5 write

     'write(string)'
         where:  string ≡ the line to write
     example -> 'write("this line")'

This command will write a string to the rexxcon console (or file.)

G.6 prompt

'prompt(string)'
    where:  string ≡ the prompt string (defaults to "-> ")
example -> 'prompt("by your command: ")'

The prompt given when a read command is issued may be set with this command. By default the prompt is ->.

G.7 stop

'stop'

This command will close the window and exit the program.

Appendix H Rexxbar

rexxbar is a very simple ARexx host program who’s only function is to set up a window with button gadgets and to wait for gadget selection. If a gadget is selected then a macro associated with the gadget is executed. The primary function of this program is to serve as an interactive front-end to other ARexx hosts.

The command line syntax for rexxbar is:

         -> [run] rexxbar [-p] [-hhostname] [script]

where script is the name of an input ARexx script to be processed. If no script is specified then the code will wait until it receives a command, presumably from a subsequently executed ARexx command or script. If the -p option is used the code will echo commands as received from ARexx. The -h option will set the host address to hostname.

H.1 Example Script for rexxbar

Commands for rexxbar, placed in an ARexx macro, consist of a command keyword followed by arguments. The arguments may be separated from the command keyword with parentheses and delimited with commas (analagous to a function call) or may be separated (and delimited) with spaces. If parentheses and commas are used then the command line must be surrounded by single quotes or else ARexx will interpret the command as a library function call (rather than a command meant for the host.) The general rule is to surround expressions (which can be single variables), which are to be interpreted internally by rexxbar, with single quotes. Otherwise, expressions (and variables) will be interpreted by ARexx before being sent to rexxbar. For example the lines below show a sequence of ARexx commands for rexxbar.

     /* example script for rexxbar */
     if ~show('ports',"RXB_AMI2D") then do
         'run ami2d:bin/rexxbar -hRXB_AMI2D'
         do while ~show('ports',"RXB_AMI2D")
         end
     end
     address rxb_ami2d
     button 0 'clear' 'ami2d:macros/clear'

     button 2 'wind'  'ami2d:macros/window'
     button 3 'find'  'ami2d:macros/find'
     button 4 'zoom'  'ami2d:macros/zoom'
     'open(-52,0,52,0,AMI2D)'
     exit

H.2 open

     'open(left,top,width,height,screen)'
         where:  left ≡ left edge offset (right edge offset if negative)
                 top ≡ top edge offset (bottom edge offset if negative)
                 width ≡ window width (relative to screen width if negative)
                 height ≡ window height (relative to screen height if negative)
                 screen ≡ public screen name
     example -> 'open(-52,0,52,0,AMI2D)'

This command will open the rexxbar window. The command requires arguments defining the window specification. The arguments are left (or right) edge offset, top (or bottom) edge offset, width (can be relative to screen width), height (can be relative to screen height) and public screen name. The edge offsets will be relative to the left and/or top edges if positive or zero otherwise they are relative to the right and/or bottom edges respectivily. The width and/or height, if positive, directly specify the window width and/or height. If they are negative or zero then they will be relative to the screen width and/or height. If the public screen name is not specified then the window will be opened on the Workbench screen. This command should only be issued after all buttons have been defined.

H.3 close

     'close'

This command will close the window.

H.4 button

'button(id,label,macro)'
    where:  id ≡ button identification number (also used for placement)
            label ≡ button label
            macro ≡ ARexx macro specification
example -> 'button(2,wind,ami2d:macros/window)'

This command will set up a button. The arguments are the button number (also used for placement), button label and macro specification.

H.5 stop

'stop'

This command will close the window and exit the program.

Concept Index 59

Concept Index

A

Aborting a command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Aborting an interactive command . . . . . . . . . . . . . . . . . . 25 Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21, 23 Ami2d.rexx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4, 32 Amiga . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ARexx. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ARexx macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4, 32 Assembly status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Axisymmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

B

Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Binary file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Body force coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Boundary condition direction . . . . . . . . . . . . . . . . . . . 11, 12 Boundary condition information. . . . . . . . . . . . . . . . . . . . 17 Boundary condition kind . . . . . . . . . . . . . . . . . . . . . . . 11, 12 Boundary condition specification . . . . . . . . . . . . . . . . . . . 11 Boundary condition type . . . . . . . . . . . . . . . . . . . . . . . 11, 12 Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

C

Cartesian coordinate system . . . . . . . . . . . . . . . . . . . . . . . 16 Command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Command line syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Commodore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Conditions for copying Ami2D . . . . . . . . . . . . . . . . . . . . . . 1 Console window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Coordinate pair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Copying conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Coupling analyses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

D

Deformation scale. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Deformed model plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Degrees of freedom. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Directory path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

E

Element identification number . . . . . . . . . . . . . . . . . . 10, 12 Element side number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Error message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 47 Example session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Exchanging data between macros . . . . . . . . . . . . . . . . . . 20 Expression evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

F

Features of Ami2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Finite element analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 21, 23

G

Gaussian quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . 13, 31 Graphical interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Grid points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Group addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Group deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Group information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Group removal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Group translation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

I

Identification number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Integration points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Integration rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Interactivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Interchange File Format (IFF) . . . . . . . . . . . . . . . . . . . . . 15 Isoparametric shape functions . . . . . . . . . . . . . . . . . . . . . . 10

L

Load vector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Concept Index 60

Local coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Local node number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

M

Material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Material boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Material identification number. . . . . . . . . . . . . . . . . . . 8, 10 Material information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Material properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Matrix solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Memory deallocation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Model checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Model geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Model information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Model integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Model plot. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Model statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Mouse pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . 9, 10, 11, 12

N

Negative Jacobians . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Node identification number . . . . . . . . . . . . . . . . . . 9, 10, 11 Node order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Node order optimizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

O

Order number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

P

Plane assumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Plotting boundary conditions . . . . . . . . . . . . . . . . . . . . . . 26 Polar coordinate system. . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Post-process solution data . . . . . . . . . . . . . . . . . . . . . . . . . 20 Pre-defined variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 23 Problem kind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Public screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

R

Reading groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Reference values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Reset window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Restriction of problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Rexxbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Rexxcon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Rigid body motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17, 30

S

Saving groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Software warranty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Solution accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Solution evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Solution information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Solution status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Starting a new problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Stiffness coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Stiffness matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Stopping the code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Storing intermediate data . . . . . . . . . . . . . . . . . . . . . . . . . . 20 System assembly. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

U

University of Texas at Austin . . . . . . . . . . . . . . . . . . . . . . 38 User’s responsibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

V

Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20, 21, 23

W

Window information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Window offsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Window shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Window size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 World coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Z

Zero energy modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Table of Contents

Ami2D Copying Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Disclaimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.1 Macros and Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Problem Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2.1 problem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.2 plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2.3 axisym . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.3 Materials. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.3.1 mat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.4.1 node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.4.2 elem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.5 Boundary Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.5.1 pbc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.5.2 dbc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.6 Problem Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.6.1 eval. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.6.2 post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.7 Utility Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.7.1 save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.7.2 read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.7.3 coord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.7.4 cd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.7.5 reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.7.6 check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.7.7 info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.7.8 version. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.7.9 stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.7.10 set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.7.11 get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.7.12 group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.7.13 alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

2.7.14 why . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2.8 Graphic Interactive Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.8.1 open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.8.2 close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.8.3 plot. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.8.4 fill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.8.5 window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.8.6 grid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.8.7 find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.8.8 zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.8.9 move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.8.10 clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.8.11 show. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

3.1 Modeling Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.2 Element Instability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.3 Post-Processing Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.4 Graphic Interaction with Ami2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4 Example Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

6 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Appendix A ARexx Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . 39

A.1 ami2d.rexx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 A.2 cleanup.rexx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 A.3 solstat.rexx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 A.4 rexxbar.rexx. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 A.5 rexxcon.rexx. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

Appendix B Ami2D Macros . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Appendix C Lin2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

C.1 Introduction to Lin2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 C.2 Model Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 C.3 Lin2D Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 C.4 formkf. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 C.5 solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 C.6 status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 C.7 abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Appendix D Nln2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

Appendix E Equ2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Appendix F Opt2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Appendix G Rexxcon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

G.1 Example Script for rexxcon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 G.2 open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 G.3 close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 G.4 read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 G.5 write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 G.6 prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 G.7 stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Appendix H Rexxbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

H.1 Example Script for rexxbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 H.2 open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 H.3 close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 H.4 button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 H.5 stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Concept Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59